package amdocs.jet.pm.net;

import java.net.Authenticator;
import java.net.PasswordAuthentication;

public class AuthenticatorImpl extends Authenticator 
{
	private String username;
	private String password;
	private String proxyHost;
	private String proxyPort;

	public AuthenticatorImpl() {}
	
	public AuthenticatorImpl(String username,String password)
	{
		this.username = username;
		this.password = password;
	}
	
	public AuthenticatorImpl(String proxyHost, String proxyPort, String username,String password)
	{
		this.proxyHost = proxyHost;
		this.proxyPort = proxyPort;
		this.username = username;
		this.password = password;
	}
	
	   
	protected PasswordAuthentication getPasswordAuthentication()
	{
		return new PasswordAuthentication(username,password.toCharArray());
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getProxyHost() {
		return proxyHost;
	}

	public void setProxyHost(String proxyHost) {
		this.proxyHost = proxyHost;
	}

	public String getProxyPort() {
		return proxyPort;
	}

	public void setProxyPort(String proxyPort) {
		this.proxyPort = proxyPort;
	}
}
